package com.sina.shop.api.gateway;

import com.sina.shop.api.gateway.filter.CustomZuulFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

/**
 * Created with IntelliJ IDEA.
 * Description: 路由
 * 段浩杰   2018-01-31-13:47
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableZuulProxy
public class ApiGatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(ApiGatewayApplication.class, args);
    }

    @Bean
    public CustomZuulFilter customZuulFilter() {
        return new CustomZuulFilter();
    }
}
